package v1

import (
	"gin-vben-admin/internal/constant"
)

type LoginReq struct {
	Email     string `json:"email" binding:"required_without=Username" example:"1234@gmail.com"`
	Username  string `json:"username" binding:"required_without=Email"`
	Password  string `json:"password" binding:"required,min=6,max=30" example:"123456"`
	CaptchaId string `json:"captcha_id" binding:"omitempty"`
	Captcha   string `json:"captcha" binding:"omitempty"`
	Remember  bool   `json:"remember" binding:"omitempty"`
}

type LoginRes struct {
	UserId             int64  `json:"uid"`
	Token              string `json:"token"`
	TokenExpire        int64  `json:"token_expire"`
	RefreshToken       string `json:"refresh_token"`
	RefreshTokenExpire int64  `json:"refresh_token_expire"`
}

type RefreshTokenReq struct {
	RefreshToken string `json:"refresh_token"`
}

type ProfileRes struct {
	UID      int64           `json:"uid"`
	Username string          `json:"username"`
	NickName string          `json:"nick_name"`
	Email    string          `json:"email"`
	Role     string          `json:"role"`
	Status   constant.Status `json:"status"`
}
